import {NgModule, ApplicationRef} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {HttpModule} from '@angular/http';
import {RouterModule} from '@angular/router';

/*
 * Platform and Environment providers/directives/pipes
 */
import {routing} from './app.routing';

// App is our top level component
import {App} from './app.component';
import {AppState, InteralStateType} from './app.service';
import {GlobalState} from './global.state';
import {NgaModule} from './theme/nga.module';
import {PagesModule} from './pages/pages.module';

// Custom Service [onAdd]s
import {LoginGuard, AdminGuard} from './filter/app.guard';
import {HttpClientHelper} from './app.httpclient';
import {AuthenticationHelper} from './app.authentication';
import {Utility} from './services/app.utility';
import {UserService} from './services/app.user';
import {IdeaService} from './services/app.idea';
import {UserProfileModule} from './pages/shared/profile/profile.module';
//Common service for share
import {FacebookHelper} from './common/app.facebook';


// Application wide providers
const APP_PROVIDERS = [
    AppState,
    GlobalState
];


/**
 * `AppModule` is the main entry point into Angular2's bootstraping process
 */
@NgModule({
    bootstrap: [App],
    declarations: [
        App
    ],
    imports: [
        BrowserModule,
        HttpModule,
        RouterModule,
        FormsModule,BrowserAnimationsModule,
        ReactiveFormsModule,
        NgaModule.forRoot(),
        PagesModule,
        UserProfileModule,
        routing
    ],
    providers: [
        APP_PROVIDERS,
        HttpClientHelper,
        AuthenticationHelper,
        Utility,
        UserService,
        IdeaService,
        LoginGuard,
        AdminGuard,
        FacebookHelper
    ]
})

export class AppModule {
    constructor() {}

}
